import Vue from 'vue'
import Vuex from 'vuex'
// import VueRouter from "vue-router";
import address from './address.js'
Vue.use(Vuex)
// Vue.use(VueRouter)

export default new Vuex.Store({
  state: {//参数
    goods:{},
    currentGoods: {},
    productId:{},
    list:{},
  },
  getters: {//get方法
    getgoods(state){
      return state.goods
    }
  },
  mutations: {//存数据进去
  setgoods(state,goodsObj){
      state.goods =goodsObj
  },
  setProductId(state,productId){
      state.productId=productId
  },
    setList(state,list){
    state.list=list
    }
  },
  actions: {
  },
  modules: {//
    address
  }
})
